python,python3: fix opkg collisions with -src packages
authorAlexandru Ardelean <[email protected]>
Tue, 8 Aug 2017 20:52:29 +0000 (23:52 +0300)
committerAlexandru Ardelean <[email protected]>
Tue, 8 Aug 2017 20:52:40 +0000 (23:52 +0300)
Fixes:
 https://github.com/openwrt/packages/issues/4681

Signed-off-by: Alexandru Ardelean <[email protected]>
lang/python/python/files/python-package-install.sh
lang/python/python3/files/python3-package-install.sh

index e8085e5e3228483b4b9130b85050ca31b6eebaee..94becf2c976927e044677d096e67e1d9b5cb8020 100644 (file)
@@ -51,7 +51,7 @@ find "$dst_dir" -name "*.egg-info" | xargs rm -rf
 
 if [ "$mode" == "sources" ] ; then
        # Copy only python source files
-       find $dst_dir -type f -not -name "*\.py" | xargs rm -f
+       find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f
 
        # Delete empty folders (if the case)
        if [ -d "$dst_dir/usr" ] ; then
index cbb84ab1c2145ad948ed2467ada58d34446292fa..dd1e708fc5e35e9dd4d6e6465bec81632789fffb 100644 (file)
@@ -51,7 +51,7 @@ find "$dst_dir" -name "*.egg-info" | xargs rm -rf
 
 if [ "$mode" == "sources" ] ; then
        # Copy only python source files
-       find $dst_dir -type f -not -name "*\.py" | xargs rm -f
+       find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f
 
        # Delete empty folders (if the case)
        if [ -d "$dst_dir/usr" ] ; then